<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GdkDevice</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GDK 3 参考手册">
<link rel="up" href="reference.html" title="API参考">
<link rel="prev" href="gdk3-GdkDeviceManager.html" title="GdkDeviceManager">
<link rel="next" href="gdk3-Points-Rectangles-and-Regions.html" title="Points and Rectangles">
<meta name="generator" content="GTK-Doc V1.17 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gdk3-GdkDeviceManager.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="reference.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GDK 3 参考手册</th>
<td><a accesskey="n" href="gdk3-Points-Rectangles-and-Regions.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gdk3-GdkDevice.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#gdk3-GdkDevice.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="gdk3-GdkDevice"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gdk3-GdkDevice.top_of_page"></a>GdkDevice</span></h2>
<p>GdkDevice — Object representing an input device</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gdk3-GdkDevice.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gdk/gdk.h&gt;

                    <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice">GdkDevice</a>;
enum                <a class="link" href="gdk3-GdkDevice.html#GdkInputSource" title="enum GdkInputSource">GdkInputSource</a>;
enum                <a class="link" href="gdk3-GdkDevice.html#GdkInputMode" title="enum GdkInputMode">GdkInputMode</a>;
enum                <a class="link" href="gdk3-GdkDevice.html#GdkAxisUse" title="enum GdkAxisUse">GdkAxisUse</a>;
enum                <a class="link" href="gdk3-GdkDevice.html#GdkDeviceType" title="enum GdkDeviceType">GdkDeviceType</a>;
enum                <a class="link" href="gdk3-GdkDevice.html#GdkGrabOwnership" title="enum GdkGrabOwnership">GdkGrabOwnership</a>;

const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="gdk3-GdkDevice.html#gdk-device-get-name" title="gdk_device_get_name ()">gdk_device_get_name</a>                 (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);
<a class="link" href="gdk3-GdkDevice.html#GdkInputSource" title="enum GdkInputSource"><span class="returnvalue">GdkInputSource</span></a>      <a class="link" href="gdk3-GdkDevice.html#gdk-device-get-source" title="gdk_device_get_source ()">gdk_device_get_source</a>               (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk3-GdkDevice.html#gdk-device-set-mode" title="gdk_device_set_mode ()">gdk_device_set_mode</a>                 (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkInputMode" title="enum GdkInputMode"><span class="type">GdkInputMode</span></a> mode</code></em>);
<a class="link" href="gdk3-GdkDevice.html#GdkInputMode" title="enum GdkInputMode"><span class="returnvalue">GdkInputMode</span></a>        <a class="link" href="gdk3-GdkDevice.html#gdk-device-get-mode" title="gdk_device_get_mode ()">gdk_device_get_mode</a>                 (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk3-GdkDevice.html#gdk-device-set-key" title="gdk_device_set_key ()">gdk_device_set_key</a>                  (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> index_</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> keyval</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-Windows.html#GdkModifierType" title="enum GdkModifierType"><span class="type">GdkModifierType</span></a> modifiers</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk3-GdkDevice.html#gdk-device-get-key" title="gdk_device_get_key ()">gdk_device_get_key</a>                  (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> index_</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *keyval</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-Windows.html#GdkModifierType" title="enum GdkModifierType"><span class="type">GdkModifierType</span></a> *modifiers</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk3-GdkDevice.html#gdk-device-set-axis-use" title="gdk_device_set_axis_use ()">gdk_device_set_axis_use</a>             (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> index_</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkAxisUse" title="enum GdkAxisUse"><span class="type">GdkAxisUse</span></a> use</code></em>);
<a class="link" href="gdk3-GdkDevice.html#GdkAxisUse" title="enum GdkAxisUse"><span class="returnvalue">GdkAxisUse</span></a>          <a class="link" href="gdk3-GdkDevice.html#gdk-device-get-axis-use" title="gdk_device_get_axis_use ()">gdk_device_get_axis_use</a>             (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> index_</code></em>);
<a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="returnvalue">GdkDevice</span></a> *         <a class="link" href="gdk3-GdkDevice.html#gdk-device-get-associated-device" title="gdk_device_get_associated_device ()">gdk_device_get_associated_device</a>    (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);
<a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             <a class="link" href="gdk3-GdkDevice.html#gdk-device-list-slave-devices" title="gdk_device_list_slave_devices ()">gdk_device_list_slave_devices</a>       (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);
<a class="link" href="gdk3-GdkDevice.html#GdkDeviceType" title="enum GdkDeviceType"><span class="returnvalue">GdkDeviceType</span></a>       <a class="link" href="gdk3-GdkDevice.html#gdk-device-get-device-type" title="gdk_device_get_device_type ()">gdk_device_get_device_type</a>          (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);
<a class="link" href="gdk3-GdkDisplay.html#GdkDisplay" title="GdkDisplay"><span class="returnvalue">GdkDisplay</span></a> *        <a class="link" href="gdk3-GdkDevice.html#gdk-device-get-display" title="gdk_device_get_display ()">gdk_device_get_display</a>              (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk3-GdkDevice.html#gdk-device-get-has-cursor" title="gdk_device_get_has_cursor ()">gdk_device_get_has_cursor</a>           (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);
<a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="gdk3-GdkDevice.html#gdk-device-get-n-axes" title="gdk_device_get_n_axes ()">gdk_device_get_n_axes</a>               (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);
<a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="gdk3-GdkDevice.html#gdk-device-get-n-keys" title="gdk_device_get_n_keys ()">gdk_device_get_n_keys</a>               (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk3-GdkDevice.html#gdk-device-warp" title="gdk_device_warp ()">gdk_device_warp</a>                     (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-GdkScreen.html#GdkScreen" title="GdkScreen"><span class="type">GdkScreen</span></a> *screen</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> x</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> y</code></em>);

<a class="link" href="gdk3-General.html#GdkGrabStatus" title="enum GdkGrabStatus"><span class="returnvalue">GdkGrabStatus</span></a>       <a class="link" href="gdk3-GdkDevice.html#gdk-device-grab" title="gdk_device_grab ()">gdk_device_grab</a>                     (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-Windows.html#GdkWindow" title="GdkWindow"><span class="type">GdkWindow</span></a> *window</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkGrabOwnership" title="enum GdkGrabOwnership"><span class="type">GdkGrabOwnership</span></a> grab_ownership</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> owner_events</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-Events.html#GdkEventMask" title="enum GdkEventMask"><span class="type">GdkEventMask</span></a> event_mask</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-Cursors.html#GdkCursor" title="GdkCursor"><span class="type">GdkCursor</span></a> *cursor</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> time_</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk3-GdkDevice.html#gdk-device-ungrab" title="gdk_device_ungrab ()">gdk_device_ungrab</a>                   (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> time_</code></em>);

<span class="returnvalue">void</span>                <a class="link" href="gdk3-GdkDevice.html#gdk-device-get-state" title="gdk_device_get_state ()">gdk_device_get_state</a>                (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-Windows.html#GdkWindow" title="GdkWindow"><span class="type">GdkWindow</span></a> *window</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *axes</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-Windows.html#GdkModifierType" title="enum GdkModifierType"><span class="type">GdkModifierType</span></a> *mask</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk3-GdkDevice.html#gdk-device-get-position" title="gdk_device_get_position ()">gdk_device_get_position</a>             (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-GdkScreen.html#GdkScreen" title="GdkScreen"><span class="type">GdkScreen</span></a> **screen</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *x</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *y</code></em>);
<a class="link" href="gdk3-Windows.html#GdkWindow" title="GdkWindow"><span class="returnvalue">GdkWindow</span></a> *         <a class="link" href="gdk3-GdkDevice.html#gdk-device-get-window-at-position" title="gdk_device_get_window_at_position ()">gdk_device_get_window_at_position</a>   (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *win_x</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *win_y</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk3-GdkDevice.html#gdk-device-get-history" title="gdk_device_get_history ()">gdk_device_get_history</a>              (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-Windows.html#GdkWindow" title="GdkWindow"><span class="type">GdkWindow</span></a> *window</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> start</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> stop</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkTimeCoord" title="struct GdkTimeCoord"><span class="type">GdkTimeCoord</span></a> ***events</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *n_events</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk3-GdkDevice.html#gdk-device-free-history" title="gdk_device_free_history ()">gdk_device_free_history</a>             (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkTimeCoord" title="struct GdkTimeCoord"><span class="type">GdkTimeCoord</span></a> **events</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_events</code></em>);
struct              <a class="link" href="gdk3-GdkDevice.html#GdkTimeCoord" title="struct GdkTimeCoord">GdkTimeCoord</a>;
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk3-GdkDevice.html#gdk-device-get-axis" title="gdk_device_get_axis ()">gdk_device_get_axis</a>                 (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *axes</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkAxisUse" title="enum GdkAxisUse"><span class="type">GdkAxisUse</span></a> use</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *value</code></em>);
<a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             <a class="link" href="gdk3-GdkDevice.html#gdk-device-list-axes" title="gdk_device_list_axes ()">gdk_device_list_axes</a>                (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk3-GdkDevice.html#gdk-device-get-axis-value" title="gdk_device_get_axis_value ()">gdk_device_get_axis_value</a>           (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *axes</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> axis_label</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *value</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="gdk3-GdkDevice.description"></a><h2>Description</h2>
<p>
The <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> object represents a single input device, such
as a keyboard, a mouse, a touchpad, etc.
</p>
<p>
See the <a class="link" href="gdk3-GdkDeviceManager.html#GdkDeviceManager" title="GdkDeviceManager"><span class="type">GdkDeviceManager</span></a> documentation for more information
about the various kinds of master and slave devices, and their
relationships.
</p>
</div>
<div class="refsect1">
<a name="gdk3-GdkDevice.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GdkDevice"></a><h3>GdkDevice</h3>
<pre class="programlisting">typedef struct {
  GObject parent_instance;

  gchar *name;
  GdkInputSource source;
  GdkInputMode mode;
  gboolean has_cursor;
  gint num_keys;
  GdkDeviceKey *keys;
  GdkDeviceManager *manager;
  GdkDisplay *display;
  /* Paired master for master,
   * associated master for slaves
   */
  GdkDevice *associated;
  GList *slaves;
  GdkDeviceType type;
  GArray *axes;
} GdkDevice;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="GdkInputSource"></a><h3>enum GdkInputSource</h3>
<pre class="programlisting">typedef enum
{
  GDK_SOURCE_MOUSE,
  GDK_SOURCE_PEN,
  GDK_SOURCE_ERASER,
  GDK_SOURCE_CURSOR,
  GDK_SOURCE_KEYBOARD
} GdkInputSource;
</pre>
<p>
An enumeration describing the type of an input device in general terms.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GDK-SOURCE-MOUSE:CAPS"></a><span class="term"><code class="literal">GDK_SOURCE_MOUSE</code></span></p></td>
<td>the device is a mouse. (This will be reported for the core
                   pointer, even if it is something else, such as a trackball.)
</td>
</tr>
<tr>
<td><p><a name="GDK-SOURCE-PEN:CAPS"></a><span class="term"><code class="literal">GDK_SOURCE_PEN</code></span></p></td>
<td>the device is a stylus of a graphics tablet or similar device.
</td>
</tr>
<tr>
<td><p><a name="GDK-SOURCE-ERASER:CAPS"></a><span class="term"><code class="literal">GDK_SOURCE_ERASER</code></span></p></td>
<td>the device is an eraser. Typically, this would be the other end
                    of a stylus on a graphics tablet.
</td>
</tr>
<tr>
<td><p><a name="GDK-SOURCE-CURSOR:CAPS"></a><span class="term"><code class="literal">GDK_SOURCE_CURSOR</code></span></p></td>
<td>the device is a graphics tablet "puck" or similar device.
</td>
</tr>
<tr>
<td><p><a name="GDK-SOURCE-KEYBOARD:CAPS"></a><span class="term"><code class="literal">GDK_SOURCE_KEYBOARD</code></span></p></td>
<td>the device is a keyboard.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GdkInputMode"></a><h3>enum GdkInputMode</h3>
<pre class="programlisting">typedef enum
{
  GDK_MODE_DISABLED,
  GDK_MODE_SCREEN,
  GDK_MODE_WINDOW
} GdkInputMode;
</pre>
<p>
An enumeration that describes the mode of an input device.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GDK-MODE-DISABLED:CAPS"></a><span class="term"><code class="literal">GDK_MODE_DISABLED</code></span></p></td>
<td>the device is disabled and will not report any events.
</td>
</tr>
<tr>
<td><p><a name="GDK-MODE-SCREEN:CAPS"></a><span class="term"><code class="literal">GDK_MODE_SCREEN</code></span></p></td>
<td>the device is enabled. The device's coordinate space
                  maps to the entire screen.
</td>
</tr>
<tr>
<td><p><a name="GDK-MODE-WINDOW:CAPS"></a><span class="term"><code class="literal">GDK_MODE_WINDOW</code></span></p></td>
<td>the device is enabled. The device's coordinate space
                  is mapped to a single window. The manner in which this window
                  is chosen is undefined, but it will typically be the same
                  way in which the focus window for key events is determined.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GdkAxisUse"></a><h3>enum GdkAxisUse</h3>
<pre class="programlisting">typedef enum
{
  GDK_AXIS_IGNORE,
  GDK_AXIS_X,
  GDK_AXIS_Y,
  GDK_AXIS_PRESSURE,
  GDK_AXIS_XTILT,
  GDK_AXIS_YTILT,
  GDK_AXIS_WHEEL,
  GDK_AXIS_LAST
} GdkAxisUse;
</pre>
<p>
An enumeration describing the way in which a device
axis (valuator) maps onto the predefined valuator
types that GTK+ understands.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GDK-AXIS-IGNORE:CAPS"></a><span class="term"><code class="literal">GDK_AXIS_IGNORE</code></span></p></td>
<td>the axis is ignored.
</td>
</tr>
<tr>
<td><p><a name="GDK-AXIS-X:CAPS"></a><span class="term"><code class="literal">GDK_AXIS_X</code></span></p></td>
<td>the axis is used as the x axis.
</td>
</tr>
<tr>
<td><p><a name="GDK-AXIS-Y:CAPS"></a><span class="term"><code class="literal">GDK_AXIS_Y</code></span></p></td>
<td>the axis is used as the y axis.
</td>
</tr>
<tr>
<td><p><a name="GDK-AXIS-PRESSURE:CAPS"></a><span class="term"><code class="literal">GDK_AXIS_PRESSURE</code></span></p></td>
<td>the axis is used for pressure information.
</td>
</tr>
<tr>
<td><p><a name="GDK-AXIS-XTILT:CAPS"></a><span class="term"><code class="literal">GDK_AXIS_XTILT</code></span></p></td>
<td>the axis is used for x tilt information.
</td>
</tr>
<tr>
<td><p><a name="GDK-AXIS-YTILT:CAPS"></a><span class="term"><code class="literal">GDK_AXIS_YTILT</code></span></p></td>
<td>the axis is used for y tilt information.
</td>
</tr>
<tr>
<td><p><a name="GDK-AXIS-WHEEL:CAPS"></a><span class="term"><code class="literal">GDK_AXIS_WHEEL</code></span></p></td>
<td>the axis is used for wheel information.
</td>
</tr>
<tr>
<td><p><a name="GDK-AXIS-LAST:CAPS"></a><span class="term"><code class="literal">GDK_AXIS_LAST</code></span></p></td>
<td>a constant equal to the numerically highest axis value.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GdkDeviceType"></a><h3>enum GdkDeviceType</h3>
<pre class="programlisting">typedef enum {
  GDK_DEVICE_TYPE_MASTER,
  GDK_DEVICE_TYPE_SLAVE,
  GDK_DEVICE_TYPE_FLOATING
} GdkDeviceType;
</pre>
<p>
Indicates the device type. See above
for more information about the meaning of these device types.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GDK-DEVICE-TYPE-MASTER:CAPS"></a><span class="term"><code class="literal">GDK_DEVICE_TYPE_MASTER</code></span></p></td>
<td>Device is a master (or virtual) device. There will
                         be an associated focus indicator on the screen.
</td>
</tr>
<tr>
<td><p><a name="GDK-DEVICE-TYPE-SLAVE:CAPS"></a><span class="term"><code class="literal">GDK_DEVICE_TYPE_SLAVE</code></span></p></td>
<td>Device is a slave (or physical) device.
</td>
</tr>
<tr>
<td><p><a name="GDK-DEVICE-TYPE-FLOATING:CAPS"></a><span class="term"><code class="literal">GDK_DEVICE_TYPE_FLOATING</code></span></p></td>
<td>Device is a physical device, currently not attached to
                           any virtual device.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GdkGrabOwnership"></a><h3>enum GdkGrabOwnership</h3>
<pre class="programlisting">typedef enum
{
  GDK_OWNERSHIP_NONE,
  GDK_OWNERSHIP_WINDOW,
  GDK_OWNERSHIP_APPLICATION
} GdkGrabOwnership;
</pre>
<p>
Defines how device grabs interact with other devices.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GDK-OWNERSHIP-NONE:CAPS"></a><span class="term"><code class="literal">GDK_OWNERSHIP_NONE</code></span></p></td>
<td>All other devices' events are allowed.
</td>
</tr>
<tr>
<td><p><a name="GDK-OWNERSHIP-WINDOW:CAPS"></a><span class="term"><code class="literal">GDK_OWNERSHIP_WINDOW</code></span></p></td>
<td>Other devices' events are blocked for the grab window.
</td>
</tr>
<tr>
<td><p><a name="GDK-OWNERSHIP-APPLICATION:CAPS"></a><span class="term"><code class="literal">GDK_OWNERSHIP_APPLICATION</code></span></p></td>
<td>Other devices' events are blocked for the whole application.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-name"></a><h3>gdk_device_get_name ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       gdk_device_get_name                 (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);</pre>
<p>
Determines the name of the device.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a name</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.20</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-source"></a><h3>gdk_device_get_source ()</h3>
<pre class="programlisting"><a class="link" href="gdk3-GdkDevice.html#GdkInputSource" title="enum GdkInputSource"><span class="returnvalue">GdkInputSource</span></a>      gdk_device_get_source               (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);</pre>
<p>
Determines the type of the device.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="gdk3-GdkDevice.html#GdkInputSource" title="enum GdkInputSource"><span class="type">GdkInputSource</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.20</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-set-mode"></a><h3>gdk_device_set_mode ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_device_set_mode                 (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkInputMode" title="enum GdkInputMode"><span class="type">GdkInputMode</span></a> mode</code></em>);</pre>
<p>
Sets a the mode of an input device. The mode controls if the
device is active and whether the device's range is mapped to the
entire screen or to a single window.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
<td>the input mode.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the mode was successfully changed.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-mode"></a><h3>gdk_device_get_mode ()</h3>
<pre class="programlisting"><a class="link" href="gdk3-GdkDevice.html#GdkInputMode" title="enum GdkInputMode"><span class="returnvalue">GdkInputMode</span></a>        gdk_device_get_mode                 (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);</pre>
<p>
Determines the mode of the device.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="gdk3-GdkDevice.html#GdkInputSource" title="enum GdkInputSource"><span class="type">GdkInputSource</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.20</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-set-key"></a><h3>gdk_device_set_key ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_device_set_key                  (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> index_</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> keyval</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-Windows.html#GdkModifierType" title="enum GdkModifierType"><span class="type">GdkModifierType</span></a> modifiers</code></em>);</pre>
<p>
Specifies the X key event to generate when a macro button of a device
is pressed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>index_</code></em> :</span></p></td>
<td>the index of the macro button to set</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>keyval</code></em> :</span></p></td>
<td>the keyval to generate</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>modifiers</code></em> :</span></p></td>
<td>the modifiers to set</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-key"></a><h3>gdk_device_get_key ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_device_get_key                  (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> index_</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *keyval</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-Windows.html#GdkModifierType" title="enum GdkModifierType"><span class="type">GdkModifierType</span></a> *modifiers</code></em>);</pre>
<p>
If <em class="parameter"><code>index_</code></em> has a valid keyval, this function will return <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>
and fill in <em class="parameter"><code>keyval</code></em> and <em class="parameter"><code>modifiers</code></em> with the keyval settings.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>index_</code></em> :</span></p></td>
<td>the index of the macro button to get.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>keyval</code></em> :</span></p></td>
<td>return value for the keyval. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>modifiers</code></em> :</span></p></td>
<td>return value for modifiers. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if keyval is set for <em class="parameter"><code>index</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.20</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-set-axis-use"></a><h3>gdk_device_set_axis_use ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_device_set_axis_use             (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> index_</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkAxisUse" title="enum GdkAxisUse"><span class="type">GdkAxisUse</span></a> use</code></em>);</pre>
<p>
Specifies how an axis of a device is used.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
<td>a pointer <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>index_</code></em> :</span></p></td>
<td>the index of the axis</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>use</code></em> :</span></p></td>
<td>specifies how the axis is used</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-axis-use"></a><h3>gdk_device_get_axis_use ()</h3>
<pre class="programlisting"><a class="link" href="gdk3-GdkDevice.html#GdkAxisUse" title="enum GdkAxisUse"><span class="returnvalue">GdkAxisUse</span></a>          gdk_device_get_axis_use             (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> index_</code></em>);</pre>
<p>
Returns the axis use for <em class="parameter"><code>index_</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
<td>a pointer <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>index_</code></em> :</span></p></td>
<td>the index of the axis.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="gdk3-GdkDevice.html#GdkAxisUse" title="enum GdkAxisUse"><span class="type">GdkAxisUse</span></a> specifying how the axis is used.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.20</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-associated-device"></a><h3>gdk_device_get_associated_device ()</h3>
<pre class="programlisting"><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="returnvalue">GdkDevice</span></a> *         gdk_device_get_associated_device    (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);</pre>
<p>
Returns the associated device to <em class="parameter"><code>device</code></em>, if <em class="parameter"><code>device</code></em> is of type
<a class="link" href="gdk3-GdkDevice.html#GDK-DEVICE-TYPE-MASTER:CAPS"><code class="literal">GDK_DEVICE_TYPE_MASTER</code></a>, it will return the paired pointer or
keyboard.
</p>
<p>
If <em class="parameter"><code>device</code></em> is of type <a class="link" href="gdk3-GdkDevice.html#GDK-DEVICE-TYPE-SLAVE:CAPS"><code class="literal">GDK_DEVICE_TYPE_SLAVE</code></a>, it will return
the master device to which <em class="parameter"><code>device</code></em> is attached to.
</p>
<p>
If <em class="parameter"><code>device</code></em> is of type <a class="link" href="gdk3-GdkDevice.html#GDK-DEVICE-TYPE-FLOATING:CAPS"><code class="literal">GDK_DEVICE_TYPE_FLOATING</code></a>, <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> will be
returned, as there is no associated device.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The associated device, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 3.0</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-list-slave-devices"></a><h3>gdk_device_list_slave_devices ()</h3>
<pre class="programlisting"><a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             gdk_device_list_slave_devices       (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);</pre>
<p>
If the device if of type <a class="link" href="gdk3-GdkDevice.html#GDK-DEVICE-TYPE-MASTER:CAPS"><code class="literal">GDK_DEVICE_TYPE_MASTER</code></a>, it will return
the list of slave devices attached to it, otherwise it will return
<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the list of
slave devices, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. The list must be freed with
<a href="../glib/glib-Doubly-Linked-Lists.html#g-list-free"><code class="function">g_list_free()</code></a>, the contents of the list are owned by GTK+
and should not be freed. <span class="annotation">[<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GdkDevice]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-device-type"></a><h3>gdk_device_get_device_type ()</h3>
<pre class="programlisting"><a class="link" href="gdk3-GdkDevice.html#GdkDeviceType" title="enum GdkDeviceType"><span class="returnvalue">GdkDeviceType</span></a>       gdk_device_get_device_type          (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);</pre>
<p>
Returns the device type for <em class="parameter"><code>device</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <a class="link" href="gdk3-GdkDevice.html#GdkDeviceType" title="enum GdkDeviceType"><span class="type">GdkDeviceType</span></a> for <em class="parameter"><code>device</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 3.0</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-display"></a><h3>gdk_device_get_display ()</h3>
<pre class="programlisting"><a class="link" href="gdk3-GdkDisplay.html#GdkDisplay" title="GdkDisplay"><span class="returnvalue">GdkDisplay</span></a> *        gdk_device_get_display              (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);</pre>
<p>
Returns the <a class="link" href="gdk3-GdkDisplay.html#GdkDisplay" title="GdkDisplay"><span class="type">GdkDisplay</span></a> to which <em class="parameter"><code>device</code></em> pertains.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="gdk3-GdkDisplay.html#GdkDisplay" title="GdkDisplay"><span class="type">GdkDisplay</span></a>. This memory is owned
by GTK+, and must not be freed or unreffed. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 3.0</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-has-cursor"></a><h3>gdk_device_get_has_cursor ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_device_get_has_cursor           (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);</pre>
<p>
Determines whether the pointer follows device motion.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the pointer follows device motion</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.20</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-n-axes"></a><h3>gdk_device_get_n_axes ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                gdk_device_get_n_axes               (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);</pre>
<p>
Returns the number of axes the device currently has.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
<td>a pointer <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the number of axes.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 3.0</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-n-keys"></a><h3>gdk_device_get_n_keys ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                gdk_device_get_n_keys               (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);</pre>
<p>
Returns the number of keys the device currently has.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the number of keys.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.24</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-warp"></a><h3>gdk_device_warp ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_device_warp                     (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-GdkScreen.html#GdkScreen" title="GdkScreen"><span class="type">GdkScreen</span></a> *screen</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> x</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> y</code></em>);</pre>
<p>
Warps <em class="parameter"><code>device</code></em> in <em class="parameter"><code>display</code></em> to the point <em class="parameter"><code>x</code></em>,<em class="parameter"><code>y</code></em> on
the screen <em class="parameter"><code>screen</code></em>, unless the device is confined
to a window by a grab, in which case it will be moved
as far as allowed by the grab. Warping the pointer
creates events as if the user had moved the mouse
instantaneously to the destination.
</p>
<p>
Note that the pointer should normally be under the
control of the user. This function was added to cover
some rare use cases like keyboard navigation support
for the color picker in the <span class="type">GtkColorSelectionDialog</span>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
<td>the device to warp.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>screen</code></em> :</span></p></td>
<td>the screen to warp <em class="parameter"><code>device</code></em> to.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>the X coordinate of the destination.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>the Y coordinate of the destination.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 3.0</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-grab"></a><h3>gdk_device_grab ()</h3>
<pre class="programlisting"><a class="link" href="gdk3-General.html#GdkGrabStatus" title="enum GdkGrabStatus"><span class="returnvalue">GdkGrabStatus</span></a>       gdk_device_grab                     (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-Windows.html#GdkWindow" title="GdkWindow"><span class="type">GdkWindow</span></a> *window</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkGrabOwnership" title="enum GdkGrabOwnership"><span class="type">GdkGrabOwnership</span></a> grab_ownership</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> owner_events</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-Events.html#GdkEventMask" title="enum GdkEventMask"><span class="type">GdkEventMask</span></a> event_mask</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-Cursors.html#GdkCursor" title="GdkCursor"><span class="type">GdkCursor</span></a> *cursor</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> time_</code></em>);</pre>
<p>
Grabs the device so that all events coming from this device are passed to
this application until the device is ungrabbed with <a class="link" href="gdk3-GdkDevice.html#gdk-device-ungrab" title="gdk_device_ungrab ()"><code class="function">gdk_device_ungrab()</code></a>,
or the window becomes unviewable. This overrides any previous grab on the device
by this client.
</p>
<p>
Device grabs are used for operations which need complete control over the
given device events (either pointer or keyboard). For example in GTK+ this
is used for Drag and Drop operations, popup menus and such.
</p>
<p>
Note that if the event mask of an X window has selected both button press
and button release events, then a button press event will cause an automatic
pointer grab until the button is released. X does this automatically since
most applications expect to receive button press and release events in pairs.
It is equivalent to a pointer grab on the window with <em class="parameter"><code>owner_events</code></em> set to
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.
</p>
<p>
If you set up anything at the time you take the grab that needs to be
cleaned up when the grab ends, you should handle the <a class="link" href="gdk3-Event-Structures.html#GdkEventGrabBroken" title="struct GdkEventGrabBroken"><span class="type">GdkEventGrabBroken</span></a>
events that are emitted when the grab ends unvoluntarily.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a>. To get the device you can use <code class="function">gtk_get_current_event_device()</code>
or <a class="link" href="gdk3-Events.html#gdk-event-get-device" title="gdk_event_get_device ()"><code class="function">gdk_event_get_device()</code></a> if the grab is in reaction to an event. Also, you can use
<a class="link" href="gdk3-GdkDeviceManager.html#gdk-device-manager-get-client-pointer" title="gdk_device_manager_get_client_pointer ()"><code class="function">gdk_device_manager_get_client_pointer()</code></a> but only in code that isn't triggered by a
<a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> and there aren't other means to get a meaningful <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> to operate on.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>window</code></em> :</span></p></td>
<td>the <a class="link" href="gdk3-Windows.html#GdkWindow" title="GdkWindow"><span class="type">GdkWindow</span></a> which will own the grab (the grab window)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>grab_ownership</code></em> :</span></p></td>
<td>specifies the grab ownership.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>owner_events</code></em> :</span></p></td>
<td>if <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> then all device events are reported with respect to
<em class="parameter"><code>window</code></em> and are only reported if selected by <em class="parameter"><code>event_mask</code></em>. If
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> then pointer events for this application are reported
as normal, but pointer events outside this application are
reported with respect to <em class="parameter"><code>window</code></em> and only if selected by
<em class="parameter"><code>event_mask</code></em>. In either mode, unreported events are discarded.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>event_mask</code></em> :</span></p></td>
<td>specifies the event mask, which is used in accordance with
<em class="parameter"><code>owner_events</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cursor</code></em> :</span></p></td>
<td>the cursor to display while the grab is active if the device is
a pointer. If this is <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then the normal cursors are used for
<em class="parameter"><code>window</code></em> and its descendants, and the cursor for <em class="parameter"><code>window</code></em> is used
elsewhere. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>time_</code></em> :</span></p></td>
<td>the timestamp of the event which led to this pointer grab. This
usually comes from the <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> struct, though <a class="link" href="gdk3-Events.html#GDK-CURRENT-TIME:CAPS" title="GDK_CURRENT_TIME"><code class="literal">GDK_CURRENT_TIME</code></a>
can be used if the time isn't known.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="gdk3-General.html#GDK-GRAB-SUCCESS:CAPS"><code class="literal">GDK_GRAB_SUCCESS</code></a> if the grab was successful.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 3.0</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-ungrab"></a><h3>gdk_device_ungrab ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_device_ungrab                   (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> time_</code></em>);</pre>
<p>
Release any grab on <em class="parameter"><code>device</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>time_</code></em> :</span></p></td>
<td>a timestap (e.g. <a class="link" href="gdk3-Events.html#GDK-CURRENT-TIME:CAPS" title="GDK_CURRENT_TIME"><code class="literal">GDK_CURRENT_TIME</code></a>).</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 3.0</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-state"></a><h3>gdk_device_get_state ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_device_get_state                (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-Windows.html#GdkWindow" title="GdkWindow"><span class="type">GdkWindow</span></a> *window</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *axes</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-Windows.html#GdkModifierType" title="enum GdkModifierType"><span class="type">GdkModifierType</span></a> *mask</code></em>);</pre>
<p>
Gets the current state of a pointer device relative to <em class="parameter"><code>window</code></em>. As a slave
device coordinates are those of its master pointer, This
function may not be called on devices of type <a class="link" href="gdk3-GdkDevice.html#GDK-DEVICE-TYPE-SLAVE:CAPS"><code class="literal">GDK_DEVICE_TYPE_SLAVE</code></a>,
unless there is an ongoing grab on them, see <a class="link" href="gdk3-GdkDevice.html#gdk-device-grab" title="gdk_device_grab ()"><code class="function">gdk_device_grab()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>window</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-Windows.html#GdkWindow" title="GdkWindow"><span class="type">GdkWindow</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>axes</code></em> :</span></p></td>
<td>an array of doubles to store the values of the axes of <em class="parameter"><code>device</code></em> in,
or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mask</code></em> :</span></p></td>
<td>location to store the modifiers, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-position"></a><h3>gdk_device_get_position ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_device_get_position             (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-GdkScreen.html#GdkScreen" title="GdkScreen"><span class="type">GdkScreen</span></a> **screen</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *x</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *y</code></em>);</pre>
<p>
Gets the current location of <em class="parameter"><code>device</code></em>. As a slave device
coordinates are those of its master pointer, This function
may not be called on devices of type <a class="link" href="gdk3-GdkDevice.html#GDK-DEVICE-TYPE-SLAVE:CAPS"><code class="literal">GDK_DEVICE_TYPE_SLAVE</code></a>,
unless there is an ongoing grab on them, see <a class="link" href="gdk3-GdkDevice.html#gdk-device-grab" title="gdk_device_grab ()"><code class="function">gdk_device_grab()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
<td>pointer device to query status about.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>screen</code></em> :</span></p></td>
<td>location to store the <a class="link" href="gdk3-GdkScreen.html#GdkScreen" title="GdkScreen"><span class="type">GdkScreen</span></a>
the <em class="parameter"><code>device</code></em> is on, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>location to store root window X coordinate of <em class="parameter"><code>device</code></em>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>location to store root window Y coordinate of <em class="parameter"><code>device</code></em>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 3.0</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-window-at-position"></a><h3>gdk_device_get_window_at_position ()</h3>
<pre class="programlisting"><a class="link" href="gdk3-Windows.html#GdkWindow" title="GdkWindow"><span class="returnvalue">GdkWindow</span></a> *         gdk_device_get_window_at_position   (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *win_x</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *win_y</code></em>);</pre>
<p>
Obtains the window underneath <em class="parameter"><code>device</code></em>, returning the location of the device in <em class="parameter"><code>win_x</code></em> and <em class="parameter"><code>win_y</code></em>. Returns
<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the window tree under <em class="parameter"><code>device</code></em> is not known to GDK (for example, belongs to another application).
</p>
<p>
As a slave device coordinates are those of its master pointer, This
function may not be called on devices of type <a class="link" href="gdk3-GdkDevice.html#GDK-DEVICE-TYPE-SLAVE:CAPS"><code class="literal">GDK_DEVICE_TYPE_SLAVE</code></a>,
unless there is an ongoing grab on them, see <a class="link" href="gdk3-GdkDevice.html#gdk-device-grab" title="gdk_device_grab ()"><code class="function">gdk_device_grab()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
<td>pointer <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> to query info to.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>win_x</code></em> :</span></p></td>
<td>return location for the X coordinate of the device location,
relative to the window origin, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>win_y</code></em> :</span></p></td>
<td>return location for the Y coordinate of the device location,
relative to the window origin, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <a class="link" href="gdk3-Windows.html#GdkWindow" title="GdkWindow"><span class="type">GdkWindow</span></a> under the device position, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 3.0</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-history"></a><h3>gdk_device_get_history ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_device_get_history              (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-Windows.html#GdkWindow" title="GdkWindow"><span class="type">GdkWindow</span></a> *window</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> start</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> stop</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkTimeCoord" title="struct GdkTimeCoord"><span class="type">GdkTimeCoord</span></a> ***events</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *n_events</code></em>);</pre>
<p>
Obtains the motion history for a pointer device; given a starting and
ending timestamp, return all events in the motion history for
the device in the given range of time. Some windowing systems
do not support motion history, in which case, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> will
be returned. (This is not distinguishable from the case where
motion history is supported and no events were found.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>window</code></em> :</span></p></td>
<td>the window with respect to which which the event coordinates will be reported</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start</code></em> :</span></p></td>
<td>starting timestamp for range of events to return</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>stop</code></em> :</span></p></td>
<td>ending timestamp for the range of events to return</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>events</code></em> :</span></p></td>
<td>location to store a newly-allocated array of <a class="link" href="gdk3-GdkDevice.html#GdkTimeCoord" title="struct GdkTimeCoord"><span class="type">GdkTimeCoord</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_events][<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_events</code></em> :</span></p></td>
<td>location to store the length of <em class="parameter"><code>events</code></em>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the windowing system supports motion history and
at least one event was found.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-free-history"></a><h3>gdk_device_free_history ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_device_free_history             (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkTimeCoord" title="struct GdkTimeCoord"><span class="type">GdkTimeCoord</span></a> **events</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_events</code></em>);</pre>
<p>
Frees an array of <a class="link" href="gdk3-GdkDevice.html#GdkTimeCoord" title="struct GdkTimeCoord"><span class="type">GdkTimeCoord</span></a> that was returned by <a class="link" href="gdk3-GdkDevice.html#gdk-device-get-history" title="gdk_device_get_history ()"><code class="function">gdk_device_get_history()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>events</code></em> :</span></p></td>
<td>an array of <a class="link" href="gdk3-GdkDevice.html#GdkTimeCoord" title="struct GdkTimeCoord"><span class="type">GdkTimeCoord</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_events</code></em> :</span></p></td>
<td>the length of the array.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GdkTimeCoord"></a><h3>struct GdkTimeCoord</h3>
<pre class="programlisting">struct GdkTimeCoord {
  guint32 time;
  gdouble axes[GDK_MAX_TIMECOORD_AXES];
};
</pre>
<p>
The <a class="link" href="gdk3-GdkDevice.html#GdkTimeCoord" title="struct GdkTimeCoord"><span class="type">GdkTimeCoord</span></a> structure stores a single event in a motion history.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a href="../glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> <em class="structfield"><code><a name="GdkTimeCoord.time"></a>time</code></em>;</span></p></td>
<td>The timestamp for this event.</td>
</tr>
<tr>
<td><p><span class="term"><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> <em class="structfield"><code><a name="GdkTimeCoord.axes"></a>axes</code></em>[GDK_MAX_TIMECOORD_AXES];</span></p></td>
<td>the values of the device's axes.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-axis"></a><h3>gdk_device_get_axis ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_device_get_axis                 (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *axes</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkAxisUse" title="enum GdkAxisUse"><span class="type">GdkAxisUse</span></a> use</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *value</code></em>);</pre>
<p>
Interprets an array of double as axis values for a given device,
and locates the value in the array for a given axis use.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
<td>a <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>axes</code></em> :</span></p></td>
<td>pointer to an array of axes. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>use</code></em> :</span></p></td>
<td>the use to look for</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>location to store the found value. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the given axis use was found, otherwise <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-list-axes"></a><h3>gdk_device_list_axes ()</h3>
<pre class="programlisting"><a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             gdk_device_list_axes                (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>);</pre>
<p>
Returns a <a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a class="link" href="gdk3-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a>s, containing the labels for
the axes that <em class="parameter"><code>device</code></em> currently has.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
<td>a pointer <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a class="link" href="gdk3-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a>s, free with <a href="../glib/glib-Doubly-Linked-Lists.html#g-list-free"><code class="function">g_list_free()</code></a>. <span class="annotation">[<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GdkAtom]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 3.0</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-get-axis-value"></a><h3>gdk_device_get_axis_value ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_device_get_axis_value           (<em class="parameter"><code><a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a> *device</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *axes</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk3-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> axis_label</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *value</code></em>);</pre>
<p>
Interprets an array of double as axis values for a given device,
and locates the value in the array for a given axis label, as returned
by <a class="link" href="gdk3-GdkDevice.html#gdk-device-list-axes" title="gdk_device_list_axes ()"><code class="function">gdk_device_list_axes()</code></a>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td>
<td>a pointer <a class="link" href="gdk3-GdkDevice.html#GdkDevice" title="GdkDevice"><span class="type">GdkDevice</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>axes</code></em> :</span></p></td>
<td>pointer to an array of axes. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>axis_label</code></em> :</span></p></td>
<td>
<a class="link" href="gdk3-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> with the axis label.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>location to store the found value.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the given axis use was found, otherwise <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 3.0</p>
</div>
</div>
<div class="refsect1">
<a name="gdk3-GdkDevice.see-also"></a><h2>See Also</h2>
<a class="link" href="gdk3-GdkDeviceManager.html#GdkDeviceManager" title="GdkDeviceManager"><span class="type">GdkDeviceManager</span></a>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.17</div>
</body>
</html>